<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/common/include/taglibs.jsp"%>

<div class="row">
	<div class="col-md-4">


		<div class="navbar navbar-inner block-header">
			<div class="muted pull-left">
				메뉴 목록
				<button id="btnDbSave" onclick="dbSave();"
					class="btn btn-primary btn-mini">저장</button>
			</div>
		</div>
		<div class="block-content collapse in">
			<div class="block-content collapse in">
				<div class="dd span10" id="nestable3">
					<ol class="dd-list" id="menuOl">${menuList }
					</ol>
				</div>

			</div>

		</div>
	</div>

	<div class="col-md-8">
		<form class="form-horizontal">
			<fieldset>
				<legend>Form Horizontal</legend>
				<div class="control-group">
					<label class="control-label" for="menu_nm">메뉴명</label>
					<div class="controls">
						<input class="input-xlarge focused" id="menu_nm" type="text"
							value=""> <input class="hide" id="menu_id" type="text"
							value="">
					</div>
				</div>
				<div class="control-group">
					<label class="control-label" for="menu_type">게시판 타입</label>
					<div class="controls">
						<select id="menu_type" name="menu_type" onchange="showBtn();">
							<option value="">선택하세요</option>
							<option value="1">일반게시판</option>
							<option value="2">FAQ</option>
							<option value="3">QnA</option>
							<option value="4">포토 갤러리</option>
							<option value="20">메뉴 url입력</option>
							<option value="99">html</option>
						</select>
						<button onclick="createDb();return false;" id="btnCreateDb"
							class="btn btn-primary hide">생성</button>
					</div>
				</div>
				<div class="control-group">
					<label class="control-label" for="user_write">일반사용자 쓰기여부</label>
					<div class="controls">
						<label> <input type="checkbox" id="user_write"
							name="user_write" value="Y"> 쓰기
						</label>
					</div>
				</div>
				<div class="control-group">
					<label class="control-label" for="use_yn">메뉴 사용여부</label>
					<div class="controls">
						<label> <input type="checkbox" id="use_yn" name="use_yn"
							value="Y"> 사용
						</label>
					</div>
				</div>
				<div class="form-actions">
					<button onclick="saveMenu();return false;" class="btn btn-primary">저장</button>
					<button type="reset" class="btn">Cancel</button>
					<button onclick="addMenu();return false;" class="btn">신규추가</button>
				</div>
			</fieldset>
		</form>
	</div>
</div>

<div style="display: none;">
	<form id="frmSave" method="post" action="./saveMenu.do">
		<textarea name="menuList" id="menuList"></textarea>

	</form>
</div>
